/**
 * Created by cc
 * Description:
 * User: CZH
 * Date: 2022-09-15
 * Time: 9:42
 */
public class Test {

    public static void main(String[] args) {
        MyRealLinkedList myRealLinkedList = new MyRealLinkedList();
        myRealLinkedList.addLast(1);
        myRealLinkedList.addLast(2);
        myRealLinkedList.addLast(3);
        myRealLinkedList.addLast(4);
        myRealLinkedList.display();

        myRealLinkedList.addIndex(3,88);
        myRealLinkedList.addIndex(myRealLinkedList.size(),99);
        myRealLinkedList.display();


//        System.out.println(myRealLinkedList.size());
//        System.out.println(myRealLinkedList.contains(2));
    }


    public static void main1(String[] args) {
        MyLinkedList myLinkedList = new MyLinkedList();
//        myLinkedList.createList();

//        myLinkedList.addFirst(1);
//        myLinkedList.addFirst(2);
//        myLinkedList.addFirst(3);
//        myLinkedList.addFirst(4);

        myLinkedList.addLast(1);
        myLinkedList.addLast(2);
        myLinkedList.addLast(3);
        myLinkedList.addLast(4);

        myLinkedList.show();

        ListNode ret = myLinkedList.middleNode();
        System.out.println(ret.val);


//        ListNode ret1 = myLinkedList.reverseList();
//        myLinkedList.show2(ret1);
//
//        ListNode ret2 = myLinkedList.reverseList2();
//        myLinkedList.show();
//        myLinkedList.show2(ret2);

//        myLinkedList.clear();
//        myLinkedList.show();

//        System.out.println(myLinkedList.size());
//        System.out.println(myLinkedList.contains(2));

//        myLinkedList.remove(3);
//        myLinkedList.show();
    }
}
